﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using NHibernate.Cfg;
using NHibernate;
using NHibernate.Criterion;

namespace Advisor.Entities
{
    public class FilterCollection : System.Collections.CollectionBase
    {
        public FilterCollection()
        {
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="items"></param>
        /// 
        public FilterCollection(FilterCollection[] items)
        {
            this.addItems(items);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="items"></param>
        /// 
        public virtual void addItems(FilterCollection[] items)
        {
            foreach (ICriterion item in items)
            {
                this.List.Add(item);
            }
        }

        public virtual void addItems(FilterCollection items)
        {
            foreach (ICriterion item in items)
            {
                this.List.Add(item);
            }
        }
        /// <summary>
        /// Insere um item na coleção
        /// </summary>
        /// <param name="value"></param>
        public virtual void Add(ICriterion value)
        {
            this.List.Add(value);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public virtual bool Contains(ICriterion value)
        {
            return this.List.Contains(value);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public virtual int IndexOf(ICriterion value)
        {
            return this.List.IndexOf(value);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="Index"></param>
        /// <param name="value"></param>
        public virtual void Insert(int Index, ICriterion value)
        {
            this.List.Insert(Index, value);
        }

        public virtual  ICriterion this[int index]
        {
            get
            {
                return (ICriterion)this.List[index];
            }
            set
            {
                this.List[index] = value;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="value"></param>
        public virtual void Remove(Expression value)
        {
            this.List.Remove(value);
        }


    }
}
